Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

PluginCommon.hpp File Reference

Common includes and definitions for the Destiny Edit Plugin Interface. More...

#include "deGlobalTypes.hpp"
#include "deString.hpp"

Include dependency graph for PluginCommon.hpp:

Include dependency graph

Go to the source code of this file.

Compounds

class  IDPlugin
class  IDPManager
class  IDPMCommandHandler
class  IDPMContextMenu
class  IDPMEventHandler
class  IDPMInterface
class  IDPMMenu
class  IDPMObject
class  IDPMScene
class  IDPMSettingsHandler
struct  IDPMSettingsItem
class  IDPObject
struct  IDPObjectProperty
 Details of an object's property make-up. More...

struct  MenuState

Defines

#define PLUGIN_API   extern "C" DEDLL_IMPORT
#define CONTROL_EDITBOX   "EditBox"
#define CONTROL_STATIC   "Static"
#define CONTROL_CHECKBOX   "CheckBox"
#define CONTROL_LISTBOX   "ListBox"
#define CONTROL_COLORPICKER   "ColorPicker"
#define CONTROL_HIDDEN   "Hidden"
#define DATATYPE_STRING   "String"
#define DATATYPE_INT   "Integer"
#define DATATYPE_REAL   "Real"
#define DATATYPE_DWORD   "DWORD"
#define DATATYPE_FLOAT   "Real"
#define DATATYPE_DOUBLE   "Real"
#define DATATYPE_UNSIGNEDINT   "DWORD"
#define DATATYPE_INTEGER   "Integer"
#define DATATYPE_BOOL   "Boolean"
#define DATATYPE_LISTBOX_VALUES   "ListBoxValues"
#define IDPMEVENT_WINDOW_RESIZE   1
 Event for changes in the view's window size.

#define IDPMEVENT_FRAME   2
 Event for each frame of the editor.

#define IDPMEVENT_UPDATE_OBJECT   3
 Indicates a scene object has been changed.

#define IDPMEVENT_CONTEXT_MENU   4
 The editor is about to display a context menu.

#define IDPMEVENT_MENU   5
 The user has selected a menu item.

#define IDPMEVENT_MENU_STATE   6
 Event to query the state of a menu item.

#define IDPMEVENT_MOUSEMOVE   7
 Called when the user moves the mouse in the view area.

#define IDPMEVENT_LBUTTONDBLCLK   8
 Called when the user double clicks the left mouse button in the view area.

#define IDPMEVENT_LBUTTONDOWN   9
 Called when the user presses down the left mouse button in the view area.

#define IDPMEVENT_LBUTTONUP   10
 Called when the user releases the left mouse button in the view area.

#define IDPMEVENT_RBUTTONDBLCLK   11
 Called when the user double clicks the right mouse button in the view area.

#define IDPMEVENT_RBUTTONDOWN   12
 Called when the user presses down the right mouse button in the view area.

#define IDPMEVENT_RBUTTONUP   13
 Called when the user releases the right mouse button in the view area.

#define IDPMEVENT_MOUSEWHEEL   14
 Called when the user spins the mousewheel and the mouse is inthe view area.

#define IDPMEVENT_KEYDOWN   15
 Called when the user preses a key down.

#define IDPMEVENT_KEYUP   16
 Called when the user releases a key.

#define IDPMEVENT_ADD_OBJECT   17
 Called to indicate a new scene object has been added to the scene.

#define IDPMEVENT_DELETE_OBJECT   18
 Called to indicate that a scene object has been removed from the scene.

#define IDPMEVENT_INITIALFRAME   19
 Called on the very first frame event for the plugin/object.

#define IDPMEVENT_SHOW_SETTINGS   20
#define IDPMEVENT_APPLY_SETTINGS   21
#define IDPMEVENT_CLOSE_SETTINGS   22
#define IDPMEVENT_CUSTOM   60000
 Starting point for plugin registered event ids.

#define IDPMEVENTS_ALL   65000
 Indicates ALL events above.

#define PROP_DETAILS(name, prop, propname, propcontrol, proptype)
#define PROP_BADTYPE(name, propname)
#define PROP_SETVALUE(name, pvalue, propname, propvalue)
#define PROP_MAKELISTBOX(name, pvalue, propname, propvalues)   PROP_SETVALUE(name, pvalue, propname ":Values", propvalues)
#define PROP_CANTSET(name, propname)

Typedefs

typedef IDPManager *(* fnIDPManager_Create )()
typedef void(* fnIDPManager_Destroy )(IDPManager *)
typedef IDPlugin *(* fnIDPlugin_Create )()
typedef void(* fnIDPlugin_Destroy )(IDPlugin *)

Enumerations

enum  IDPResult {
  IDP_OK = 0, IDP_PROPERTY_NOT_FOUND = 1, IDP_CANNOT_CONVERT_PROPERTY = 2, IDP_ERROR = 3,
  IDP_PROPERTY_CANT_BE_SET = 4
}
enum  IDPMResult {
  IDPM_OK = 0, IDPM_DUPLICATE_OBJECT = 1, IDPM_DUPLICATE_MENU = 2, IDPM_MENU_NOT_FOUND = 3,
  IDPM_OBJECTHANDLER_NOT_FOUND = 4, IDPM_OBJECT_CREATE_FAILED = 5, IDPM_NO_MORE_MENU_IDS = 6, IDPM_ERROR = 7,
  IDPM_DUPLICATE_CONTROL = 8
}

Functions

DEDLL_IMPORT IDPluginIDPlugin_Create ()
DEDLL_IMPORT void IDPlugin_Destroy (IDPlugin *pInterface)
DEDLL_IMPORT IDPManagerIDPManager_Create ()
DEDLL_IMPORT void IDPManager_Destroy (IDPManager *pInterface)


Detailed Description

Common includes and definitions for the Destiny Edit Plugin Interface.

Author:
jwvanderbeck
This file is the intellectual property of Novus Delta, LLC.. Usage of the contents of this file is subject to the Destiny3D Member License which can be found at http://www.destiny3d.com. Any other usage is prohibited.

This file is distributed "AS IS" without warranty of any kind. Novus Delta, LLC. does not guarantee the fitness of the contents of this file for any particular purpose.

Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.


Change History

Date:
March, 2002
Author:
jwvanderbeck
Remarks:
Initial creation
Date:
May, 2002
Author:
jwvanderbeck
Remarks:
Added comments for generated documentation

Bug:
RTF control not working propery on older Windows

Todo:
finish up command handler

finish up this documentation

add copy option to output logs


Define Documentation

#define CONTROL_CHECKBOX   "CheckBox"
 

#define CONTROL_COLORPICKER   "ColorPicker"
 

#define CONTROL_EDITBOX   "EditBox"
 

#define CONTROL_HIDDEN   "Hidden"
 

#define CONTROL_LISTBOX   "ListBox"
 

#define CONTROL_STATIC   "Static"
 

#define DATATYPE_BOOL   "Boolean"
 

#define DATATYPE_DOUBLE   "Real"
 

#define DATATYPE_DWORD   "DWORD"
 

#define DATATYPE_FLOAT   "Real"
 

#define DATATYPE_INT   "Integer"
 

#define DATATYPE_INTEGER   "Integer"
 

#define DATATYPE_LISTBOX_VALUES   "ListBoxValues"
 

#define DATATYPE_REAL   "Real"
 

#define DATATYPE_STRING   "String"
 

#define DATATYPE_UNSIGNEDINT   "DWORD"
 

#define IDPMEVENT_ADD_OBJECT   17
 

Called to indicate a new scene object has been added to the scene.

#define IDPMEVENT_APPLY_SETTINGS   21
 

This event signifies that the user has clicked APPLY in the workspace settings dialog and the plugin should run through its settings and apply any changes Param1 will be a packaed pointer to an IDPMSettingsHandler

#define IDPMEVENT_CLOSE_SETTINGS   22
 

This event signifies that the user has clicked OK to close the workspace settings dialog and the plugin should run through its settings and apply any changes. Param1 will be a packaed pointer to an IDPMSettingsHandler

#define IDPMEVENT_CONTEXT_MENU   4
 

The editor is about to display a context menu.

#define IDPMEVENT_CUSTOM   60000
 

Starting point for plugin registered event ids.

#define IDPMEVENT_DELETE_OBJECT   18
 

Called to indicate that a scene object has been removed from the scene.

#define IDPMEVENT_FRAME   2
 

Event for each frame of the editor.

#define IDPMEVENT_INITIALFRAME   19
 

Called on the very first frame event for the plugin/object.

#define IDPMEVENT_KEYDOWN   15
 

Called when the user preses a key down.

#define IDPMEVENT_KEYUP   16
 

Called when the user releases a key.

#define IDPMEVENT_LBUTTONDBLCLK   8
 

Called when the user double clicks the left mouse button in the view area.

#define IDPMEVENT_LBUTTONDOWN   9
 

Called when the user presses down the left mouse button in the view area.

#define IDPMEVENT_LBUTTONUP   10
 

Called when the user releases the left mouse button in the view area.

#define IDPMEVENT_MENU   5
 

The user has selected a menu item.

#define IDPMEVENT_MENU_STATE   6
 

Event to query the state of a menu item.

#define IDPMEVENT_MOUSEMOVE   7
 

Called when the user moves the mouse in the view area.

#define IDPMEVENT_MOUSEWHEEL   14
 

Called when the user spins the mousewheel and the mouse is inthe view area.

#define IDPMEVENT_RBUTTONDBLCLK   11
 

Called when the user double clicks the right mouse button in the view area.

#define IDPMEVENT_RBUTTONDOWN   12
 

Called when the user presses down the right mouse button in the view area.

#define IDPMEVENT_RBUTTONUP   13
 

Called when the user releases the right mouse button in the view area.

#define IDPMEVENT_SHOW_SETTINGS   20
 

Called to indicate that the workspace settings are about to be displayed Param1 in OnEvent() will be packed with a pointer to an IDPMSettingsHandler which can be used to add settings to be displayed for the user.

#define IDPMEVENT_UPDATE_OBJECT   3
 

Indicates a scene object has been changed.

#define IDPMEVENT_WINDOW_RESIZE   1
 

Event for changes in the view's window size.

#define IDPMEVENTS_ALL   65000
 

Indicates ALL events above.

#define PLUGIN_API   extern "C" DEDLL_IMPORT
 

Sets up the proper exports/imports. Plugins need to define PLUGIN_EXPORTS somewhere before including this file in order to get the right exports

#define PROP_BADTYPE name,
propname   
 

Value:

if (name == propname)\
    return IDP_CANNOT_CONVERT_PROPERTY;
Utility macro for indicating an IDP_CANNONT_CONVERT_PROPERTY return for a property
Parameters:
name deString variable that contains the Name value as passed in through Get/SetProperty()
propname Quoted string name of the property

#define PROP_CANTSET name,
propname   
 

Value:

if (name == propname)\
{\
    return IDP_PROPERTY_CANT_BE_SET;\
}
Utility macro for indicating an IDP_PROPERTY_CANT_BE_SET return for a property
Parameters:
name deString variable that contains the Name value as passed in through SetProperty()
propname Quoted string name of the property

#define PROP_DETAILS name,
prop,
propname,
propcontrol,
proptype   
 

Value:

if (name == propname)\
{\
    prop->ControlType = propcontrol;\
    prop->Name = propname;\
    prop->NativeDataType = proptype;\
    return IDP_OK;\
}
Utility macro for returning details on a property
Parameters:
name deString variable that contains the Name value as passed in through GetPropertyDetails()
prop Pointer to Property structure to fill, as passed in through GetPropertyDetails()
propname Quoted string name of the property
propcontrol Quoted string name of the control type to use
proptype Quoted string name of the property's native data type

#define PROP_MAKELISTBOX name,
pvalue,
propname,
propvalues       PROP_SETVALUE(name, pvalue, propname ":Values", propvalues)
 

Utility macro for building the values of a listbox in GetProperty()

Parameters:
name deString variable that contains the Name value as passed in through GetProperty()
pvalue Value pointer as passed in through GetProperty()
propname Quoted string name of the property
propvalues Quoted string list of semicolon delimitted values for the listbox

#define PROP_SETVALUE name,
pvalue,
propname,
propvalue   
 

Value:

if (name == propname)\
{\
    *pvalue = propvalue;\
    return IDP_OK;\
}
Utility macro for doing a very simple property value return
Parameters:
name deString variable that contains the Name value as passed in through GetProperty()
pvalue Value pointer as passed in through GetProperty()
propname Quoted string name of the property
propvalue Value of the property


Typedef Documentation

typedef IDPlugin*(* fnIDPlugin_Create)()
 

Used internally to create an instance of the PluginManager. This should never be used by a plugin.

typedef void(* fnIDPlugin_Destroy)(IDPlugin*)
 

Used internally to destroy an instance of the PluginManager. This should never be used by a plugin.

typedef IDPManager*(* fnIDPManager_Create)()
 

The PluginManager uses this function to create an instance of the plugin. This should never be used by a plugin.

typedef void(* fnIDPManager_Destroy)(IDPManager*)
 

The PluginManager uses this function to destroy an instance of the plugin. This should never be used by a plugin.


Enumeration Type Documentation

enum IDPMResult
 

Standard result codes for PluginManager use. These are the standard result codes that the PluginManager will use to return from various functions.

Enumeration values:
IDPM_OK  Indictates that no error occured.
IDPM_DUPLICATE_OBJECT  Attempted to register an object type that already exists.
IDPM_DUPLICATE_MENU  Attempted to create a menu that already exists.
IDPM_MENU_NOT_FOUND  The specified menu id was not found.
IDPM_OBJECTHANDLER_NOT_FOUND  No valid handler could be found for the specified object type.
IDPM_OBJECT_CREATE_FAILED  The SceneManager was unable to create an object of the specified type.
IDPM_NO_MORE_MENU_IDS  The menu can not be created because the system has run out of menu ids.
IDPM_ERROR  An unspecified error was returned.
IDPM_DUPLICATE_CONTROL  Attempted to create a control of a type that already exists.

enum IDPResult
 

Standard result codes for Plugin use. These are the standard result codes that plugins use to return from various functions.

Enumeration values:
IDP_OK  Indictates that no error occured.
IDP_PROPERTY_NOT_FOUND  The specified object property could not be found.
IDP_CANNOT_CONVERT_PROPERTY  The specified property's native data type varies from that used, and no conversion is possible.
IDP_ERROR  An unspecified error has occurred.
IDP_PROPERTY_CANT_BE_SET  The specified property could not be set.


Function Documentation

DEDLL_IMPORT IDPlugin* IDPlugin_Create  
 

The PluginManager uses this function to create an instance of the plugin. This should never be used by a plugin.

Returns:
New instance of the interface created

DEDLL_IMPORT void IDPlugin_Destroy IDPlugin   pInterface
 

The PluginManager uses this function to destroy an instance of the plugin. This should never be used by a plugin.

Parameters:
pInterface Instance of the interface to be destroyed

DEDLL_IMPORT IDPManager* IDPManager_Create  
 

Used internally to create an instance of the PluginManager. This should never be used by a plugin.

DEDLL_IMPORT void IDPManager_Destroy IDPManager   pInterface
 

Used internally to destroy an instance of the PluginManager. This should never be used by a plugin.


Generated on Mon Sep 12 20:10:24 2005 for Destiny3D by doxygen1.3-rc3